from sqlalchemy import Boolean, Column, Integer, String, Double
from mysqls_prod.database import Base


class ModelTask(Base):
    __tablename__ = "c_ai_task"
    id = Column(Integer, primary_key=True, index=True)
    msg = Column(String(1024))
    job_id = Column(String(32))
    status = Column(Integer)
    result = Column(String(512))


class ModelConfig(Base):
    __tablename__ = "model_config_rvc"
    id = Column(Integer, primary_key=True, index=True)
    model_id = Column(Integer)
    speaker_zh = Column(String(64))
    speaker = Column(String(64))
    model_path = Column(String(255))
    index_path = Column(String(255))
    language = Column(String(20))
    device = Column(String(20))
    state = Column(String(20))
    length = Column(Double)

class CustomizeTone(Base):
    __tablename__ = "c_customize_tone"
    id = Column(Integer, primary_key=True, index=True)
    user_id = Column(Integer)
    model_id = Column(Integer)
    status = Column(Integer)
    common_spk=Column(String(64))
    common_name = Column(String(64))
    training_source = Column(String(526))
    msg = Column(String(255))